#ifndef __UI_H__
#define __UI_H__


#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "lvgl/lvgl.h"


enum
{
    E_UI_MENU=0,
    E_UI_MONITOR_DATA,
    E_UI_MONITOR_CHART,
    E_UI_SETTING,
    E_UI_MAX,
};
typedef uint32_t e_ui_type;

enum
{
    E_UI_DATA_PM2D5=0,
    E_UI_DATA_PM1,
    E_UI_DATA_PM10,
    E_UI_DATA_FORMALDEHYDE_TVOC_CO2,
    E_UI_DATA_TEMP_HUMIDITY,
    E_UI_DATA_MAX,
};
typedef uint32_t e_ui_data_type;

enum
{
    E_UI_CHART_PM2D5=0,
    E_UI_CHART_PM1,
    E_UI_CHART_PM10,
    E_UI_CHART_FORMALDEHYDE,
    E_UI_CHART_TVOC,
    E_UI_CHART_CO2,
    E_UI_CHART_TEMP,
    E_UI_CHART_HUMIDITY,
    E_UI_CHART_MAX,
};
typedef uint32_t e_ui_chart_type;

enum
{
    E_UI_SET_MAIN=0,
    E_UI_SET_QRCODE,
    E_UI_SET_WIFI_SCAN,
    E_UI_SET_WIFI_CONFIG,
    E_UI_SET_MAX,
};
typedef uint32_t e_ui_set_type;


void ui_init(void);
bool ui_enter(e_ui_type type, void *para);
void ui_handle(void);
void ui_return(void);
void ui_input_feedback(struct _lv_indev_drv_t *dev, uint8_t code);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif//__UI_H__

